namespace java com.ydche.idl_output
namespace py idl_output

include "structs.thrift"

service IDao {
    //for kernel
    void save_car_raw_info(1:structs.CarRawInfo info) throws (1: structs.RequestException re),
    structs.CarRawInfo get_car_raw_info_by_license(1:string license) throws (1: structs.RequestException re),# 查询失败返回空
    structs.CarRawInfo get_car_raw_info_by_vin(1:string vin) throws (1: structs.RequestException re),
    structs.CarRawInfo get_car_owner_info(1:string vin, 2:string license) throws (1: structs.RequestException re),
    void update_car_raw_info(1:structs.CarRawInfo info, 2:string license) throws (1: structs.RequestException re),# 1:update content 2:filter
    void update_car_owner_info(1:structs.CarRawInfo info, 2:string license, 3:string vin) throws (1: structs.RequestException re),# 1:update content 23: filter

    void add_car_insurance_info(1:structs.CarInsuranceInfo info) throws (1: structs.RequestException re),
    structs.CarInsuranceInfo get_car_insurance_info(1:string licenseNo, 2:string frameNo, 3:string engineNo) throws (1: structs.RequestException re),

    list<structs.InsuranceTypes> get_insurance_types() throws (1: structs.RequestException re),
    list<structs.InsuranceUnit> get_insurance_units(1:string provinceCode, 2:string cityCode, 3:string appId) throws (1: structs.RequestException re),
    list<structs.InsuranceUnitInfo> get_insurance_unit_list(), //new add
    string get_rate1(1:string appId, 2:string cityCode, 3:string insuranceCode) throws (1: structs.RequestException re),

    void save_open_order(1:structs.OpenOrderKernel order, 2:structs.OpenInsuranceKernel insurance, 3:structs.ReceiverInfo receiver) throws (1: structs.RequestException re),

    map<string, structs.InsuranceTypesList> get_tpic_map() throws (1: structs.RequestException re),
    map<string, structs.InsuranceTypesList> get_clpc_map() throws (1: structs.RequestException re),
    map<string, structs.InsuranceTypesList> get_taic_map() throws (1: structs.RequestException re),


    //for biz
    i32 add_user(1:structs.UserProfile user) throws (1:structs.RequestException re),
    i32 update_user(1:structs.UserProfile user) throws (1:structs.RequestException re),
    structs.UserProfile get_user_by_mobile(1:string mobile) throws (1:structs.RequestException re),
    i32 add_user_role(1:structs.UserRole user_role) throws (1:structs.RequestException re),
    i32 add_account(1:structs.Account account) throws (1:structs.RequestException re),
    i32 add_customer_info(1:structs.CustomerInfoDB info) throws (1:structs.RequestException re),
    //new add
    list<structs.CustomerInfoDB> get_customer_list(1: i64 owner_id) throws (1:structs.RequestException re),
    list<structs.CustomerInfoDB> get_customer_info(1: i64 owner_id, 2: string mobile, 3: string doc_code, 4: string customer_name) throws (1:structs.RequestException re),
    i64 add_carprofile(1:structs.CarProfileDB car) throws (1:structs.RequestException re)
    structs.CarTypesDB get_cartypes(1: string brandCode) throws (1:structs.RequestException re),
    structs.CarProfileDB get_carprofile(1: i64 user_id, 2: i64 customer_id, 3: string license_no, 4: string vin_no, 5: string engine_no, 6: string register_date) throws (1:structs.RequestException re),
    list<structs.CarProfileDB> get_carfile_list(1: i64 user_id, 2: i64 customer_id) throws (1:structs.RequestException re),
    list<structs.CarProfileDB> get_carfile_license_no_list(1: i64 user_id, 2: i64 customer_id, 3: string license_no) throws (1:structs.RequestException re),
    i64 add_ins_qry_list(1: structs.InsuranceQueryListDB ins_qry) throws (1:structs.RequestException re),
    list<structs.InsuranceQueryListDB> get_ins_qry_list(1: i64 user_id) throws (1:structs.RequestException re),
    list<structs.InsuranceQueryListDB> get_ins_qry_list_Parms(1: i64 user_id, 2: string biz_id) throws (1:structs.RequestException re),
    void add_ins_cost_list(1: list<structs.InsQryCostListDB> cost_list) throws (1:structs.RequestException re),
    i64 add_insurance_order(1: structs.CarInsuranceOrderDB order) throws (1:structs.RequestException re),
    void add_ins_order_cost(1: list<structs.InsOrderCostDB> ins_order_list) throws (1:structs.RequestException re),
    structs.LocationDB getProvince(1: string gbCode),
    structs.LocationDB getCity(1: string gbCode),
    structs.LocationDB getDistrict(1: string gbCode),
    list<structs.OrderInfo> getUnFinishedOrder(1: i64 user_id, 2: i32 page, 3: i32 row),
    list<structs.OrderInfo> getFinishedOrder(1: i64 user_id, 2: i32 page, 3: i32 row),
    list<structs.OrderInfo> getFailOrder(1: i64 user_id, 2: i32 page, 3: i32 row),

    //test
    string test_string(1:string a, 2:string b),
    structs.CarRawInfo test_struct(1:structs.CarRawInfo a) throws (1: structs.RequestException re),
}